<?php

/**
 * category actions.
 *
 * @package    blog
 * @subpackage category
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class categoryActions extends sfActions
{
 /*
  public function executeIndex(sfWebRequest $request)
  {
    $this->blog_categorys = Doctrine_Core::getTable('BlogCategory')
      ->createQuery('a')
      ->execute();
  }
*/
  public function executeShow(sfWebRequest $request)
  {
      
    $this->blog_category = $this->getRoute()->getObject();     
    
    //$this->blog_news_category = Doctrine_Core::getTable('BlogNew')->getNewsCategory($request->getParameter('id'),10);
    //$this->blognews = new BlogNew();
    //$this->blognews->getNewsCategory(1,1);
    //$this->category = $this->getRoute()->getObject();
    
    $this->pager = new sfDoctrinePager('BlogNew',10);
    $this->pager->setQuery(Doctrine::getTable('BlogNew')->createQuery('a')->where('category_id = ?', $request->getParameter('id') )->orderBy('updated_at DESC'));
    $this->pager->setPage($request->getParameter('page',1));
    $this->pager->init();
         
    
  }  
}
